package com.myspring.pojo;

import java.text.SimpleDateFormat;
import java.util.Date;

public class People {
    private String name;
    private String str;

    public People() {
        System.out.println("People已构造~");
        System.out.println("People构造时间："+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));

    }

    public People(String name, String str) {
        this.name = name;
        this.str = str;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getStr() {
        return str;
    }

    public void setStr(String str) {
        this.str = str;
    }

    public void sayHi(){
        System.out.println(name+"说："+str);
    }
}
